package org.mspring.mlog.service;

import org.mspring.platform.counter.CounterManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 统计服务
 *
 * @since 2014年4月25日
 * @author Gao Youbo
 */
@Service
public class StatisticService {
    @Autowired
    private CounterManager counterManager;

    /**
     * 文章点击
     *
     * @param postId
     */
    public void postClick(long postId) {
        counterManager.increment("post", "click", String.valueOf(postId));
    }

    /**
     * 站点点击
     */
    public void siteClick() {
        counterManager.increment("site", "click");
    }
}
